package val.to.entities;

import java.util.Calendar;

import android.graphics.Bitmap;
import android.net.Uri;

public class UploadItem {

	static int Counter = 0;

	public enum UploadStatus {
		Uploaded, Uploading, Canceled, Pending, Error;
	}

	public UploadItem(Uri ImageUri, String Caption, boolean IsFacebook) {
		mImageUri = ImageUri;
		mCaption = Caption;
		mStartTime = Calendar.getInstance();
		mStatus = UploadStatus.Pending;
		mID = Counter++;
		mIsFacebook = IsFacebook;
	}

	Uri mImageUri;
	String mCaption;
	Calendar mStartTime;
	UploadStatus mStatus;
	int mID;
	Bitmap mThumbnail;
	String mErrorMessage;
	String mErrorDetails;
	boolean mIsFacebook;

	public synchronized String getErrorMessage() {
		return mErrorMessage;
	}
	
	public synchronized String getErrorDetails() {
		return mErrorDetails;
	}
	
	public synchronized void setErrorDetails(String ErrorDetails) {
		this.mErrorDetails = ErrorDetails;
	}

	public synchronized void setErrorMessage(String ErrorMessage) {
		this.mErrorMessage = ErrorMessage;
	}

	public synchronized boolean IsFacebook() {
		return mIsFacebook;
	}

	public synchronized void setIsFacebook(boolean IsFacebook) {
		this.mIsFacebook = IsFacebook;
	}

	public synchronized Bitmap getThumbnail() {
		return mThumbnail;
	}

	public synchronized void setThumbnail(Bitmap mThumbnail) {
		this.mThumbnail = mThumbnail;
	}

	public int getID() {
		return mID;
	}

	public void setID(int ID) {
		this.mID = ID;
	}

	public Uri getImageUri() {
		return mImageUri;
	}

	public String getCaption() {
		return mCaption;
	}

	public Calendar getStartTime() {
		return mStartTime;
	}

	public synchronized UploadStatus getStatus() {
		return mStatus;
	}

	public synchronized void SetStatus(UploadStatus newStatus) {
		mStatus = newStatus;
	}
}
